package org.demo;

import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author yexi
 * @see DynamicDataSourceAutoConfiguration 动态数据源核心自动配置类
 * @see com.baomidou.dynamic.datasource.ds.AbstractRoutingDataSource 动态数据库核心类
 */
@SpringBootApplication
@MapperScan(basePackages = "org.demo.mapper")
public class DynamicDatasourceApplication {

    /**
     * @see com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure 引入druid-spring-boot的自动配置类。检查导致与dynamic冲突的根源。
     */
    public static void main(String[] args) {
        SpringApplication.run(DynamicDatasourceApplication.class, args);
    }

}
